from configparser import ConfigParser
from math import floor

con = ConfigParser()

def gcon(section:str,option:str):
    con.read("D:\\输出\\config.ini")
    return con.get(section,option)

def wcon(section: str, option: str, value: str):
    con.read("D:\\输出\\config.ini")
    con.set(section, option, value)
    with open("D:\\输出\\config.ini", 'w') as f:
        con.write(f)

def get_scale_num(raw)->int:
    return  floor(float(gcon("setting","scale"))*raw)